#ifndef __THREAD_H__
#define __THREAD_H__

#ifndef WIN32
#include <pthread.h>
typedef void (*ThreadFunction)(void *);
#endif

/*
 * Simple class to provide a platform independent Thread class
 */
class Thread
{
    public:
        // construct a Thread with a function pointer. When function returns, thread is killed
        Thread(void(void*));
       ~Thread(void);
        Thread(const Thread&);
        Thread& operator=(Thread&);
        void stop(void);

#ifndef WIN32
    private:
        pthread_t thread;
        static ThreadFunction t_f;
        static void *temp(void *args);
#endif
};

#endif
